<?php

$this->Html->addCrumb('Home', '/admin');
$this->Html->addCrumb('Lista Paginas', array('action' => 'index'));
$this->Html->addCrumb('Novo Paginas', array());

echo $this->Form->create('Paginas.Pagina', array(
    'inputDefaults' => array(
        'div' => 'form-group',
        'wrapInput' => false,
        'class' => 'form-control'
    ),
    'class' => 'well'
));

echo $this->Form->input('Pagina.id');
echo $this->Form->input('Pagina.titulo', array('label' => __d('paginas', 'Titulo')));

echo $this->Midia->redactor('Pagina.descricao', array('label' => __d('paginas', 'Descricao')));

echo $this->Form->input('Pagina.default', array('label' => __d('paginas', 'Default'), 'type' => 'select', 'options' => array('0' => 'Não', '1' => 'Sim'), 'div' => array('class' => 'col-xs-12 col-md-3')));
echo $this->Form->input('Pagina.status', array('label' => __d('paginas', 'Situação'), 'type' => 'select', 'options' => array('0' => 'Inativo', '1' => 'Ativo'), 'div' => array('class' => 'col-xs-12 col-md-3')));
echo $this->Form->input('Pagina.exibir_menu', array('label' => __d('paginas', 'Exibir no menu'), 'type' => 'select', 'options' => array('0' => 'Inativo', '1' => 'Ativo'), 'div' => array('class' => 'col-xs-12 col-md-3')));
echo $this->Form->input('Pagina.ordem', array('label' => __d('paginas', 'Ordem'), 'div' => array('class' => 'col-xs-12 col-md-3')));

echo $this->Form->input('Pagina.autor', array('label' => __d('paginas', 'Autor'), 'div' => array('class' => 'col-xs-12 col-md-6')));
echo $this->Form->input('Pagina.chaves', array('label' => __d('paginas', 'Chaves'), 'div' => array('class' => 'col-xs-12 col-md-6')));

echo $this->Form->input('Pagina.css', array('label' => __d('paginas', 'Css'), 'div' => array('class' => 'col-xs-12 col-md-6')));
echo $this->Form->input('Pagina.js', array('label' => __d('paginas', 'Js'), 'div' => array('class' => 'col-xs-12 col-md-6')));
echo $this->Form->input('Pagina.css_file', array('type' => 'text', 'label' => __d('paginas', 'CssFile')));
echo $this->Form->input('Pagina.js_file', array('type' => 'text', 'label' => __d('paginas', 'JsFile')));
echo $this->Form->input('Pagina.router', array('label' => __d('paginas', 'Router')));

echo $this->Form->button('Salvar', array('class' => 'btn btn-success', 'type' => 'submit', 'icon' => 'fa fa-save'));

echo $this->Form->end();

$this->Html->script('/js/select2-3.4.8/select2.min.js', array('block' => 'script'));
$this->Html->script('/js/paginas.js', array('block' => 'script'));
$this->Html->css('/js/select2-3.4.8/select2.css', array('block' => 'css'));
$this->Html->css('/js/select2-3.4.8/select2-bootstrap.css', array('block' => 'css'));
?>